package com.transfiguro.datamodel.csmodels;

import com.transfiguro.datamodel.GenericStatement;

public class CSGenericMethodCall extends GenericStatement {
    private String scope;
    private String methodName;
    private String args;

    public CSGenericMethodCall() {
        REQUIRE_CLOSING = true;
        methodName = "";
    }

    public boolean isRequireClosing() {
        return REQUIRE_CLOSING;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(final String scope) {
        this.scope = scope;
    }

    public String getArgs() {
        return args;
    }

    public void setArgs(final String args) {
        this.args = args;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(final String methodName) {
        this.methodName = methodName;
    }

    @Override
    public String toString() {
        StringBuilder result = new StringBuilder();
        final String methodNameString = (scope != null ? scope + '.' : "") + (methodName);
        result.append('\t').append(methodNameString).append('(').append(args != null ? args : "")
                .append(')');//.append(';');
        return result.toString();
    }
}
